﻿using System;

namespace Hook
{
    public sealed class CallbackEventArgs : EventArgs
    {
        #region Variables

        private IntPtr _wParam;
        private IntPtr _lParam;
        private bool _Handled = false;

        #endregion

        #region Properties

        /// <summary>
        /// Gets the word param value that is passed to the current hook procedure. (The context vary depends on the type of hook associated with the current hook chain.)
        /// </summary>
        public IntPtr WordParam
        {
            get { return _wParam; }
        }

        /// <summary>
        /// Gets the long param value that is passed to the current hook procedure. (The context vary depends on the type of hook associated with the current hook chain.)
        /// </summary>
        public IntPtr LongParam
        {
            get { return _lParam; }
        }

        /// <summary>Gets or sets a value indicating whether the application handled the event.</summary>
        /// <value>true if handled by the application; otherwise, false.</value>
        public bool Handled
        {
            get { return _Handled; }
            set { _Handled = value; }
        }

        #endregion

        #region

        /// <summary>
        /// Initializes a new instance of the <see cref="CallbackEventArgs"/> class.
        /// </summary>
        /// <param name="wParam">The word param value that is passed to the current hook procedure.</param>
        /// <param name="lParam">The long param value that is passed to the current hook procedure.</param>
        public CallbackEventArgs(IntPtr wParam, IntPtr lParam)
        {
            this._wParam = wParam;
            this._lParam = lParam;
        }

        #endregion
    }
}
